package meng.dubbo.demo.service.impl;

import java.util.List;

import meng.dubbo.demo.dao.StudentDao;
import meng.dubbo.demo.model.Student;
import meng.dubbo.demo.service.StudentService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("studentService")
public class StudentServiceImpl implements StudentService {

	@Autowired
	private StudentDao studentDao;

	public void add(Student stu) {
		studentDao.add(stu);
	}

	public void delete(int id) {
		studentDao.delete(id);
	}

	public void update(Student stu) {
		studentDao.update(stu);
	}

	public Student getById(int id) {
		return studentDao.getById(id);
	}

	public List<Student> getAll() {
		return studentDao.getAll();
	}

}
